/*
 * Copyright (C) 2015-2018 EPAM Systems
 *
 * This file is part of Indigo ELN.
 *
 * Indigo ELN is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Indigo ELN is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Indigo ELN.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

@import 'variables.less';
@import 'mixin.less';
@import 'helper.less';

/******************TABS*********************/

.nav-tabs {

  > li {

    > a {
      border-top: 0 none;
      color: @tabs-link-color;
      font-family: @tabs-link-family;
      margin-right: 0;
      padding: @tabs-link-pad;
      text-transform: uppercase;

      &:hover, &:focus {
        background-color: transparent;
        border-color: transparent;
        color: @tabs-link-hover-color;
      }
      .icon-close {
        margin-top: 2px;
        margin-left: 13px;
      }
    }

    &.active {
      > a {
        &,
        &:hover,
        &:focus {
          border-top-color: transparent;
        }
      }
    }
  }
}

//Main tabs

.main-tabs {
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 18px;

  .main-tab {
    border-bottom: 1px solid @nav-tabs-border-color;
    display: inline-block;
    float: none;
    .opacity(0.5);

    &.active {
      border-bottom-color: #fff;
      .opacity(1);

      .main-tab-link {
        color: @brand2;
      }
    }
  }
}

.tab-content {

  //&.simple-entity {
  //  height: ~"calc(100vh - 156px)";
  //  overflow-y: auto;
  //  padding: @pad-space 0;
  //}


  &-pad {
    padding: 0 @pad-space;

    &.dictionary-management, &.role-management, &.user-management {
      height: ~"calc(100vh - 170px)";
      overflow-y: auto;
    }
  }
}

//Inner panel tabs

.inner-tabs {

  .nav-tabs {
    padding: 0 @pad-space;

    > li {

      > a {
        border-width: 0 0 @inner-tabs-link-border-width;
        border-bottom: @inner-tabs-link-border-width solid transparent;
        font: @inner-tabs-link-size @inner-tabs-link-family;
        padding: @inner-tabs-link-pad;

        &:hover, &:focus {
          border-bottom-color: @inner-tabs-link-hover-border-color;
        }
      }

      &.active {
        > a {
          border-width: 0 0 @inner-tabs-link-border-width;
          &,
          &:hover,
          &:focus {
            border-bottom-color: @inner-tabs-link-hover-border-color;
          }
        }
      }
    }
  }

  .tab-content {
    background-color: @gray-lighter;
    border: 1px solid @border-color;
    border-top: 0 none;
    padding: @pad-space;

    height: ~"calc(100vh - 330px)";
    overflow-y: hidden;
    overflow-x: hidden;

  }

  .simple-tab-content {
    border: 1px solid @border-color;
    padding: @pad-space;

    height: ~"calc(100vh - 300px)";
    overflow-y: auto;

  }

  .admin-tab-content {
    border: 1px solid @border-color;
    padding: @pad-space;
    height: ~"calc(100vh - 340px)";
    overflow-y: auto;

    .preview-components{
      .tab-content {
        overflow-y:hidden;
        height: inherit;
      }
    }

  }

  .simditor {
    .simditor-wrapper {
      .simditor-body, .simditor-placeholder {
        font-size: 14px;
        font-family: inherit;

        p {
          color: #616161;
        }
      }
    }
  }
}

//EPMLSOPELN-436 'display' replaced  to 'visible' to avoid grid mCustomScrollbar reset
.tab-content {
    .tab-pane {
        display: block;
        visibility: hidden;
        height: 0;
        overflow: hidden;
    }
    .active {
        visibility: visible;
        height: auto;
    }
}
